<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<script>
			const arr = [55, 66, 34, 99]
			const str = Symbol.iterator
			arr[str] = function (v) {
				const length = this.length
				let index = 0
				const arr = this
				return {
					next: function () {
                        console.log(this)
						console.log(index)
						index++
						return index > length
							? { value: arr[length - 1], done: true }
							: {
									value: arr[index - 1],
									done: false,
							  }
					},
				}
			}
			
			for (const iterator of arr) {
				console.log(iterator)
			}
		</script>
	</head>
	<body></body>
</html>
